/**
 * HW11
 *
 * brief description of the program
 *
 * This program is released to public domain according to
 * author's wish, you can view full license at
 * http://tomatoeskit.org/upload/PublicDomainLicense.txt
 *
 * @author Fangning CHENG (Alpha.L Cheng) <chengf@purdue.edu>
 *
 * @lab section number 
 *
 * @date Sep 16, 2013
 *
 */

public class Array {
    private int[] _array;
    public Array(int[] array)
    {
        _array = array;
    }
    
    public int sum()
    {
        int ret = 0;
        for (int element : _array) {
            ret += element;
        }
        return ret;
    }
    
    public double average()
    {
        return (double) sum() / _array.length;
    }
    
}
